﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHModel.Entities;
using NHibernate;

namespace NHBLL
{
    public static class MsgContentService
    {
        //public static IList<MsgContent> GetAll()
        //{
        //}

        public static bool Add(object u)
        {
            ISession session = NHelper.GetCurrentSession();
            ITransaction it = session.BeginTransaction();
            bool flag = true;
            try
            {
                session.Save(u);
                it.Commit();
            }
            catch (Exception ex)
            {
                flag = false;
                it.Rollback();
                throw (ex);
            }
            return flag;
        }
    }
}
